﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace ZombieGame
{
    public static class Camera
    {
        public static Vector2 Position { get { return new Vector2(Rectangle.X, Rectangle.Y); } set { Rectangle.X = (int)value.X; Rectangle.Y = (int)value.Y; } }
        public static Vector2 Scale { get { return new Vector2((float)ZombieGame.Current.GraphicsDevice.Viewport.Width / (float)Rectangle.Width, (float)ZombieGame.Current.GraphicsDevice.Viewport.Height / (float)Rectangle.Height); } set { Rectangle.Width = (int)(ZombieGame.Current.GraphicsDevice.Viewport.Width * value.X); Rectangle.Height = (int)(ZombieGame.Current.GraphicsDevice.Viewport.Height * value.Y); } }
        public static float Rotation;
        public static Rectangle Rectangle;
        public static bool Enabled;
        public static Matrix Matrix { get { return Matrix.CreateRotationZ(Rotation) * Matrix.CreateTranslation(-new Vector3(Rectangle.X, Rectangle.Y, 0f)) * Matrix.CreateScale(new Vector3(Scale, 1f)); } }
    }
}
